package com.ysx.teacher.day20210908.extendss.ch00;

public class Car  {

    private String color;
    private float  price;

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public float getPrice() {
        return price;
    }

    public void setPrice(float price) {
        this.price = price;
    }

    public Car(String color, float price) {
        this.color = color;
        this.price = price;
    }

    public Car(){

    }

    @Override
    public boolean equals(Object object) {
        // 把1个对象强制转化为Car

        // int money = (int) salary;
        Car car2 = (Car) object;
        if(this.price != car2.price){
            return true;
        }else{
            return false;
        }
    }

}
